using System.Collections.Generic;
using UnityEngine;

namespace HEFramework
{
    /// <summary>
    /// Monster data,Monster.xlsx
    /// </summary>
    public class DRMonster:IData
    {
        
        /// <summary>
        /// ID  different
        /// </summary>
        public int ID { get; protected set; }
        /// <summary>
        /// 名字  outputKey
        /// </summary>
        public string Name { get; protected set; }
        /// <summary>
        /// 是否友好  
        /// </summary>
        public bool Friendly { get; protected set; }
        /// <summary>
        /// 攻击力  
        /// </summary>
        public float Att { get; protected set; }
        /// <summary>
        /// 速度  
        /// </summary>
        public double Speed { get; protected set; }

        
        public void ParseDataRow(string input)
        {
            string[] text = input.Split('	');
            int index = 0;
        
            ID = int.Parse(text[index++]);
            Name = DataTableExtension.GetStringFromKey(text[index++]);
            Friendly = bool.Parse(text[index++]);
            Att = float.Parse(text[index++]);
            Speed = double.Parse(text[index++]);

        }
        
        private void AvoidJIT()
        {
            new Dictionary<int, DRMonster>();
        }
    }
}